package com.niiwoo.civet.user.dao.mapper;

import com.niiwoo.civet.user.dao.entity.NoticeMessage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by dell on 2017/12/15.
 * Description：civet-parent
 */
public interface NoticeMessageMapperExt extends NoticeMessageMapper{

    /**
     * 获取最新公告id
     * @return
     */
    Integer newestNoticeId();


    /**
     * 查询总记录数
     * @param mobileNo 		手机号码
     * @return
     */
    int queryNoticeListCount(@Param("mobileNo") String mobileNo);


    /**
     * 分页查询公告列表数据
     * @param offset        起始偏移量
     * @param pageSize      最终位置
     * @param mobileNo 		手机号码
     * @return
     */
    List<NoticeMessage> queryNoticeListByPage(@Param("offset") int offset, @Param("pageSize") int pageSize, @Param("mobileNo") String mobileNo);
    
    /**
     * 根据手机号码查询当前最新的公告
     * 
     * @param mobileNo
     * @return
     */
    NoticeMessage selectNewestNoticeMessage(@Param("mobileNo") String mobileNo);
}
